package com.wkbb.basic.service.impl;

import com.wkbb.basic.mapper.PositionMapper;
import com.wkbb.basic.model.Position;
import com.wkbb.basic.service.PositionService;
import com.wkbb.common.base.BaseServiceImpl;
import com.wkbb.common.enums.OrganizationTypeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author liuxiancan
 */
@Service
@Slf4j
public class PositionServiceImpl extends BaseServiceImpl<Position> implements PositionService {

    @Autowired
    private PositionMapper positionMapper;

    @Autowired
    public void setMapper(PositionMapper mapper) {
        super.setMapper(mapper);
    }


    /**
     * 获取岗位列表
     * @return
     */
    @Override
    public List<Position> getPositionList(Integer orgType){
        Map<String, Object> queryParams = new HashMap<>();
        queryParams.put("orgType", orgType);
        List<Position> list = positionMapper.getListByMapParams(queryParams);
        return list;
    }
}
